(bug 22970) Made upload.js compatible with FF<3.5.
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Sun, 11 Apr 2010 21:01:56 +0000 (21:01 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Sun, 11 Apr 2010 21:01:56 +0000 (21:01 +0000)
includes/DefaultSettings.php
skins/common/upload.js

index 669fa54..bd48250 100644 (file)
@@ -1684,7 +1684,7 @@ $wgCacheEpoch = '20030516000000';
  * to ensure that client-side caches do not keep obsolete copies of global
  * styles.
  */
-$wgStyleVersion = '269';
+$wgStyleVersion = '270';
 
 
 # Server-side caching:
index 99bb688..fc16ebc 100644 (file)
@@ -43,17 +43,20 @@ function wgUploadSetup() {
        
        // AJAX wpDestFile warnings
        if ( wgAjaxUploadDestCheck ) {
+               // Insert an event handler that fetches upload warnings when wpDestFile
+               // has been changed
                document.getElementById( 'wpDestFile' ).onchange = function ( e ) { 
                        wgUploadWarningObj.checkNow(this.value);
                };
+               // Insert a row where the warnings will be displayed just below the 
+               // wpDestFile row
                var optionsTable = document.getElementById( 'mw-htmlform-description' ).tBodies[0];
-               var row = document.createElement( 'tr' );
+               var row = optionsTable.insertRow( 1 );
                var td = document.createElement( 'td' );
                td.id = 'wpDestFile-warning';
                td.colSpan = 2;
                
                row.appendChild( td );
-               optionsTable.insertBefore( row, optionsTable.children[1] );
        }
        
        if ( wgAjaxLicensePreview ) {